<?php
namespace app\admin\validate;

use think\Request;
use think\Validate;

class ShopGoodsSave extends Validate
{

    protected $rule = [
        'title' => 'require',
        'price' => 'require|gt:0',
        'total' => 'egt:0',
        'path' => 'require',
        'pps' => 'require',
    ];

    protected $message = [
        'title.require' => '请输入商品标题',
        'price.require' => '价格不能小于0',
        'price.gt' => '价格不能小于0',
        'total.egt' => '库存不能小于0',
        'path.require' => '请上传图片',
        'pps.require' => '规格不能为空',

    ];
}